home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / xml / XDRWriter$EntityProxy.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  2.1 KB  |  51 lines

  1. package com.extensibility.xml;
  2.  
  3. public class XDRWriter$EntityProxy extends XDRWriter.DeclProxy {
  4.    // $FF: synthetic field
  5.    final XDRWriter this$0;
  6.    GeneralEntityDeclaration decl;
  7.  
  8.    XDRWriter$EntityProxy(XDRWriter var1) {
  9.       super(var1);
  10.       this.this$0 = var1;
  11.    }
  12.  
  13.    XDRWriter$EntityProxy(XDRWriter var1, GeneralEntityDeclaration var2) {
  14.       super(var1);
  15.       this.this$0 = var1;
  16.       this.setDecl(var2);
  17.    }
  18.  
  19.    void setDecl(GeneralEntityDeclaration var1) {
  20.       this.decl = var1;
  21.       super.setDecl(var1);
  22.    }
  23.  
  24.    public void write(SXE var1, boolean var2) {
  25.       var1.writeElem("Entity");
  26.       var1.writeAttr("name", this.decl.getName());
  27.       if (this.decl.isInternal()) {
  28.          var1.writeText(this.this$0.schema.expandPERefs(this.decl.getValue(), this.decl), false);
  29.       } else {
  30.          ExternalGEDeclaration var3 = (ExternalGEDeclaration)this.decl;
  31.          if (var3.isUnparsed()) {
  32.             var1.writeAttr("notation", var3.getNotation());
  33.          }
  34.  
  35.          if (((EntityDeclaration)var3).getSystemID() != null) {
  36.             var1.writeAttr("systemID", this.this$0.schema.expandPERefs(((EntityDeclaration)var3).getSystemID().toSource(), this.decl));
  37.          }
  38.  
  39.          if (((EntityDeclaration)var3).getPublicID() != null) {
  40.             var1.writeAttr("publicID", this.this$0.schema.expandPERefs(((EntityDeclaration)var3).getPublicID(), this.decl));
  41.          }
  42.       }
  43.  
  44.       var1.flush("Entity");
  45.       if (var2) {
  46.          ((XDRWriter.DeclProxy)this).writeComments(var1);
  47.       }
  48.  
  49.    }
  50. }
  51.